home *** CD-ROM | disk | FTP | other *** search
/ Programming Sound Cards / Programming Sound Cards.iso / sound_57 / sampler.doc < prev    next >
Text File  |  1995-01-01  |  32KB  |  674 lines

  1.  
  2.  
  3.  
  4.      Digital Sound Sample Playback and Manipulation System     
  5.      -----------------------------------------------------
  6.  
  7.  
  8.           Version 2.0        Rowan McKenzie  28/3/89
  9.  
  10.  
  11.                    (C) Copyright 1989 by Rowan McKenzie
  12.  
  13.                   You may copy these files  or use the source  code  only 
  14.         for non-profit purposes. Please contact me if you wish to use any 
  15.         part of the package for commercial purposes. 
  16.                   I accept  no responsibility for any  injury  or  damage 
  17.         caused by the use of any of these files.
  18.  
  19.  
  20.  
  21.  
  22.      SAMPLER/PWMSAMPL  is true public domain. In other words, I ask for  no 
  23. payment, registration fee, donations.... But please distribute these  files 
  24. in  the form you found them. Also I would appreciate acknowledgment in  any 
  25. programs which use sections of my source code.
  26.  
  27.  
  28.  
  29.  
  30.      Introduction
  31.      ------------
  32.  
  33.  
  34.      SAMPLER    and    PWMSAMPL    are    packages    for    playing    and           
  35. manipulating  digitised  sound  samples.  SAMPLER  expects  an  8  bit  D/A 
  36. converter  to be available on a parallel printer port, while PWMSAMPL  will 
  37. play  sounds on the PC speaker using pulse width modulation. Of course  the 
  38. quality  of sound will be much better for the D/A version, however the  PWM 
  39. version requires no additional hardware.
  40.  
  41.      Support is provided for playing Pianoman .MUS files as songs using the 
  42. current sampled sound.
  43.  
  44.  
  45.  
  46.      Hardware Requirements
  47.      ---------------------
  48.  
  49.      PWMSAMPL requires:
  50.  
  51.           IBM XT/AT or close compatible
  52.  
  53.           Hercules, CGA or EGA graphics card
  54.  
  55.  
  56.      SAMPLER requires in addition to the above:
  57.  
  58.           An  8  bit D/A converter connected to  a  parallel 
  59.           printer port
  60.  
  61.           If  the sampling feature is to be used, a  fast  8 
  62.           bit a/d converter is required (although the source 
  63.           code  will  probably  need to  modified  for  your 
  64.           setup).
  65.  
  66.  
  67.      Software Requirements
  68.      ---------------------
  69.  
  70.           MSDOS Ver 2.00 or later
  71.  
  72.           Pianoman  program  and support files  (PCblue  Vol 
  73.           216, PCsig Vol 279) if the song mode is to used
  74.  
  75.  
  76.  
  77.  
  78.      Background
  79.      ----------
  80.  
  81.      SAMPLER  and  PWMSAMPL were derived from an A/D,  D/A  sound  sampling 
  82. system I wrote for an old CPM computer system. 
  83.  
  84.      The  pulse width modulation code uses the 8253 timer chip in one  shot 
  85. mode  to  drive  the PC speaker with variable length pulses at  a  rate  of 
  86. about 20kHz. Varying the pulse length produces the same result  as  varying 
  87. the  voltage on a linearly controlled speaker. Unfortunately, the  software 
  88. overhead for this could mean that slow XT systems may not be fast enough to 
  89. run  PWMSAMPL.  Also  the sound volume is quite low (it's  limited  by  the 
  90. difference  between the shortest and longest pulses used, which is  limited 
  91. by  the  sample rate, which is 20kHz for reasonable quality), so  you  will 
  92. need to listen in a quiet room, or else build a D/A converter for SAMPLER !
  93.  
  94.      If  you  are interested in building a D/A converter to hear  the  much 
  95. better sound quality of SAMPLER, a standard R-2R resistor ladder (R ~  10k) 
  96. into an amplifier of reasonably high input impedance (or low impedance  via 
  97. a  100k resistor) will be quite adequate. Alternatively, an active  circuit 
  98. using a chip such as the DAC0800 with its own power supply could be  built. 
  99. The circuit shown below worked adequately for me.
  100.  
  101.  
  102. D7 --- 20k ---+--- 200k ----->  to amplifier
  103.               |
  104.              10k
  105.               |
  106. D6 --- 20k ---+
  107.               |
  108.              10k
  109.               |
  110. D5 --- 20k ---+
  111. p             |
  112. r
  113. i           etc ...
  114. n
  115. t             |
  116. e            10k
  117. r             |
  118. D0 --- 20k ---+
  119.               |
  120.              20k
  121.               |
  122.    =============== gnd
  123.  
  124.  
  125.  
  126.      To  utilise  the sampling feature, a fast (at least  20kHz  conversion 
  127. rate) A/D converter must be available. My converter was designed to begin a 
  128. conversion following a CPU access. As long as samples are taken at  regular 
  129. intervals,  this  technique  minimises  I/O  overheads.  The  converter  is 
  130. addressed  at the same location as the D/A converter to simplify the  code. 
  131. If your converter doesn't meet these specifications (probably won't),  then 
  132. the  assembler code will require modification. SAMPLER is written in  Turbo 
  133. Pascal Version 5, and the font and driver units can only be used with  that 
  134. compiler.
  135.  
  136.  
  137.  
  138.  
  139.      Using SAMPLER / PWMSAMPL
  140.      ------------------------
  141.  
  142.      Version  2.0 of SAMPLER now uses mouse control rather than  cumbersome 
  143. keyboard commands. It is therefore necessary to have an MSMOUSE (R)  driver 
  144. installed  before  starting the program. Most mouse packages come  with  an 
  145. MSMOUSE  compatible driver and either two or three button mouses will  work 
  146. fine.  If a mouse is unavailable, the cursor keys provide mouse  emulation, 
  147. although this makes controlling SAMPLER more difficult. 
  148.  
  149.      If  you  are using a mouse, generally the left  mouse  button  selects 
  150. objects  while the right button cancels. The exception to this is for  wave 
  151. drawing where the right button enables drawing. Dialog boxes which  contain 
  152. a  Continue prompt expect you to click on the box containing  the  Continue 
  153. prompt,  although  the  right mouse button will have  the  same  effect  by 
  154. canceling the prompt. Also, pressing Enter in this situation will cause the 
  155. program  to continue. You will notice that while a sound is being  replayed 
  156. no mouse activity is possible. It was necessary to disable mouse interrupts 
  157. while producing sounds to avoid overloading the CPU. However, mouse control 
  158. can  be temporarily restored during sounds by holding down the right  shift 
  159. key.
  160.  
  161.      If no mouse is available, the arrow keys provide coarse mouse control, 
  162. and the left shift key together with the arrow keys provides fine  control. 
  163. The  left  button  is emulated with the Alt key, and the  right  button  is 
  164. replaced by the Ctrl key. For compatibility with my other mouse  controlled 
  165. programs,  the  Caps lock key performs the same function as  Ctrl,  however 
  166. because a custom keyboard handler intercepts keyboard information, the caps 
  167. lock key can become confused. If the Caps Lock LED ever comes on, it may be 
  168. necessary to press Caps lock again before the program will continue.
  169.  
  170.      When  SAMPLER  is  first  started  by  typing  SAMPLER  or   PWMSAMPL, 
  171. information   will  be  displayed  about  the  default  settings   of   the 
  172. configuration  file. When the default sound file has loaded, a  dialog  box 
  173. containing  all current settings will appear. Normally this is  ignored  by 
  174. clicking on the continue box (or canceling with the right button or Enter), 
  175. however, you may wish to alter an option before starting. 
  176.  
  177.      Once  you  are  past the initial dialog box, a  plot  of  the  current 
  178. waveform  will appear, together with several other objects. At the  top  of 
  179. the  screen  appears a group of menu headings. Clicking on a  heading  will 
  180. bring  a  sub-menu  down.  All SAMPLER functions now  appear  in  the  menu 
  181. structure,  and no keyboard commands exist. The state of the more  relevant 
  182. toggle-able functions and variables is given in a panel near the top of the 
  183. screen,  all  of  which may be changed from the Settings box  in  the  menu 
  184. (under  Options). The current waveform appears in the center of the  screen 
  185. with  the current start, end and loop arrows above and below. At the  lower 
  186. right  is a collection of click-boxes which control the pitch of the  sound 
  187. when  replayed. The vertical arrows control the octave of the sound,  while 
  188. the large and small left/right arrows alter the pitch within an octave. The 
  189. larger  arrows  provide  coarse control. The Reset  box  will  restore  the 
  190. original default replay pitch, canceling the effect of other boxes. At  the 
  191. lower  right  of the screen are a similar set of boxes  which  control  the 
  192. period of the auto-timer. The auto-timer determines the rate of "auto sound 
  193. repeat" and the speed of songs.
  194.  
  195.      The  left,  right and loop arrows determine which part  of  the  sound 
  196. sample  is to be replayed and looped. The mouse is now used to alter  these 
  197. arrows by clicking on one and then dragging it. Normally the resolution  of 
  198. mouse  control is fairly rough, however the arrows may now be  placed  with 
  199. absolute precision by utilising the Zoom feature. After roughly placing  an 
  200. arrow, a region box can be marked in the waveform box by pressing the  left 
  201. mouse  button and dragging. If a region is marked near the  relevant  arrow 
  202. and  the Zoom option is selected, a magnified view is obtained  where  each 
  203. screen pixel represents one sample interval. At this point the arrow can be 
  204. dragged  to the exact position desired. Thus, it is now possible  to  align 
  205. arrows  such  that  start and end levels match,  thereby  avoiding  audible 
  206. "clicks" due to mismatched levels when looping. 
  207.  
  208.      As  just mentioned, a new feature known as an "active region box"  can 
  209. be  marked in the wave box by pressing the left mouse button and  dragging. 
  210. The region box describes an area where some function is to be applied, such 
  211. as mirroring, envelope scaling, cutting, pasting etc. Most functions  which 
  212. apply  an  operation to a specific area require a region box to  be  marked 
  213. before they will be visible in the menu. In fact, all but one option  under 
  214. the Edit menu are unavailable until a region is marked. Further, the  Paste 
  215. and Mix options remain invisible until a region has been marked, cut, and a 
  216. destination  region  has  been marked.  This  "invisible"  approach  avoids 
  217. confusing  SAMPLER about where operations should be applied when no  region 
  218. has been specified, and avoids accidental damage to the waveform (there  is 
  219. no Undo function yet).
  220.  
  221.      Also,  when  in Zoomed mode (and no region box is active),  the  right 
  222. mouse  button  allows direct editing of a waveform by  drawing  on  screen. 
  223. Using this technique, it is possible to remove clicks and pops from  sounds 
  224. where  joins  have been made, by drawing over them. I  find  this  function 
  225. extremely useful for tidying sounds after mirroring or clearing just before 
  226. saving them to disk.
  227.  
  228.      The  computer  keyboard is now permanently in the  musical  instrument 
  229. mode,  ie. pressing an alpha key sounds a note at a particular  pitch.  The 
  230. arrangement  of keys is set to look similar to a guitar fretboard or  piano 
  231. keyboard depending of the Instrument type setting in the Settings menu. For 
  232. the guitar fretboard option the Z key corresponds to an open low E  string, 
  233. the A key is an open A string, the Q key is an open D string, and the 1 key 
  234. is an open G string. Alternatively, the keyboard may be considered to be  4 
  235. rows of semitone intervals starting on the above notes. 
  236.  
  237.      For  the  piano  layout, the lower two rows  (Z../,A..')  represent  F 
  238. natural to A# with the B key representing C natural and replaying the sound 
  239. at  the original recorded pitch. The upper two rows (Q-],1-\)  are  similar 
  240. but are an octave above the lower two rows with the Y key being C  natural. 
  241. Unfortunately,  it  is  difficult to visualise the  black  notes  initially 
  242. because  there  are  no missing keys like on a real  piano!  However,  this 
  243. arrangement  may  be  preferable  for anyone not  familiar  with  a  guitar 
  244. fretboard.
  245.  
  246.  
  247.  
  248.      SAMPLER / PWMSAMPL Menu Functions
  249.      ---------------------------------
  250.  
  251.      The  following  functions  appear  in the  menu  structure  under  the 
  252. indicated major headings.
  253.  
  254.  
  255.      ===============
  256.      Settings                                ( Options )
  257.      ===============
  258.  
  259.           Clicking  on fields in the Settings window allows all  adjustable 
  260.      program parameters to be edited. Boolean type parameters are  adjusted 
  261.      by  clicking on either the "Y" box or the "N" box. The box  containing 
  262.      an  uppercase  character  indicates the  current  setting.  All  other 
  263.      parameters can be edited by clicking on the field and typing in a  new 
  264.      value.  If  a  blank field is entered,  the  current  setting  remains 
  265.      unchanged. Fields in the Settings window include:
  266.  
  267.           Current path: allows a new sound files directory to be  selected. 
  268.                   A  new drive prefix may also be included to allow  change 
  269.                   of drive.
  270.  
  271.           Current sound  file: shows the currently active sound file.  This 
  272.                   field  can  not  be  altered (use  the  Read  sound  file 
  273.                   option).
  274.  
  275.           Instrument  type:  allows a guitar fretboard  or  piano  keyboard 
  276.                   layout  to  be selected for the computer  keyboard  (ref. 
  277.                   discussion on keyboard layout above). 
  278.  
  279.           System  type: this function selects the type of computer (XT,  XT 
  280.                   turbo, AT, AT turbo) being used. The faster machines will 
  281.                   use  a  faster sample rate to give better  bandwidth  and 
  282.                   sound  quality.  The  speed  of  song  playback  is  also 
  283.                   affected  by  this  because Pianoman's  .MUS  files  will 
  284.                   contain  different duration values for  different  system 
  285.                   speeds. 
  286.                          To determine the correct selection, start with the 
  287.                   appropriate setting for your PC, and if the sound is very 
  288.                   low  in  pitch or badly distorted, try a  lower  setting. 
  289.                   Slow  XT systems may not be fast enough even for  the  XT 
  290.                   selection.  The only solution to this is to use a  faster 
  291.                   computer!  The default machine type can be configured  in 
  292.                   SAMPLER.CNF.   Note   that  PWMSAMPL  chooses   two   PWM 
  293.                   frequencies depending on this setting. If the XT  setting 
  294.                   causes  severe  noise or distortion in the  PWM  version, 
  295.                   then your PC is just too slow for the job. Selecting  the 
  296.                   AT  setting allows a higher PWM carrier frequency  to  be 
  297.                   used which results in slightly better sound quality  (but 
  298.                   requires more processing speed).
  299.  
  300.           Key release: this toggles key release sensitivity. When  enabled, 
  301.                   releasing a key after playing a sound will terminate  the 
  302.                   sound. When disabled, sounds will continue after the  key 
  303.                   is released.
  304.  
  305.           Loop mode: when active, sounds will loop continuously between the 
  306.                   loop  pointer  and right pointer. When  inactive,  sounds 
  307.                   will  be played once from the left pointer to  the  right 
  308.                   pointer.  Loop  mode  can be used  to  simulate  infinite 
  309.                   length sounds using finite length samples.
  310.  
  311.           Auto  timer:  toggles  the use of the timer facility.  The  timer 
  312.                   determines  how long sounds will last. The  main  purpose 
  313.                   for this is to control the speed of songs (although notes 
  314.                   within songs can be different lengths). However the timer 
  315.                   can be useful even when playing notes manually. For  this 
  316.                   situation, selecting auto timer mode means that the  loop 
  317.                   facility  now loops to the start of the sound  after  the 
  318.                   timer  period. This is useful for  repetitive  percussive 
  319.                   sounds  because  the loop rate is fixed  for  all  notes, 
  320.                   unlike  the normal loop mode where the loop rate  depends 
  321.                   on    the    pitch   of   the    note    being    played.                    
  322.                   When  the auto timer is enabled, the loop  setting  still 
  323.                   affects the sound produced. If looping is inactive,  then 
  324.                   for sounds shorter than the timer duration, there will be 
  325.                   silence following the end of a sound until the next timer 
  326.                   instance. If loop mode is active then the sound will loop 
  327.                   as described previously, until the next timer instance.
  328.  
  329.           Trigger level: changes the minimum A/D level required to begin  a 
  330.                   sample operation. WARNING: if no converter is  available, 
  331.                   setting   the  trigger  level  above  zero  will   almost 
  332.                   certainly  cause the program to enter an  infinite  loop, 
  333.                   while waiting for a sample. Re-booting is the only way to 
  334.                   recover from this situation.
  335.  
  336.           Sample rate: sets the sample rate for the sampling function to  a 
  337.                   specified  number  of kilohertz. Setting a  low  sampling 
  338.                   rate  allows  a  longer sample to be  recorded,  while  a 
  339.                   faster  rate  provides a wider bandwidth. If  the  sample 
  340.                   rate  is  altered from the default, then  the  pitch  for 
  341.                   replay will not match the original pitch without manually 
  342.                   altering the playback pitch.
  343.  
  344.           D/A  port: allows a different I/O address to be selected for  the 
  345.                   D/A converted (SAMPLER only). See the discussion below on 
  346.                   D/A port address in Editing the Default Configuration.
  347.  
  348.  
  349.  
  350.      ===============
  351.      Help                                    ( Options )
  352.      ===============
  353.  
  354.           Provides  very  brief general help for using  SAMPLER.  For  more 
  355.      information, read this file!
  356.  
  357.  
  358.      ===============
  359.      Directory                               ( File )
  360.      ===============
  361.  
  362.           Provides full screen display of all files in the directory on the 
  363.      default sound files path.
  364.  
  365.  
  366.      ===============
  367.      Read sound file                         ( File )
  368.      ===============
  369.  
  370.           Provides  a directory listing of sound files in the current  path 
  371.      and allows a new sound file to be selected by clicking on a file name. 
  372.      Selecting the Specify Input File box allows a file name to be typed in 
  373.      (optionally including an overriding path) and loaded. Note that  small 
  374.      files will overlay only part of the sample buffer. If an active region 
  375.      (see  above)  has been marked, then the sound will be loaded  in  that 
  376.      space  and truncated to fit if necessary. If no region is marked,  the 
  377.      sound  file  will  be loaded starting at the extreme  left.  The  Read 
  378.      process  can be canceled with the right mouse button, or by entering a 
  379.      blank response in the manual input box.
  380.  
  381.  
  382.      ================
  383.      Write sound file                        ( File )
  384.      ================
  385.  
  386.           Saves  the  sound between the left and right pointers to  a  disk 
  387.      file in the current path. Note that the file name may be preceded by a 
  388.      drive and path prefix to override the current drive/path. The  process 
  389.      may be canceled as described above.
  390.  
  391.  
  392.      ===============
  393.      Quit to DOS                             ( File )
  394.      ===============
  395.  
  396.           Terminates  SAMPLER and returns control to the DOS  command  line 
  397.      following confirmation
  398.  
  399.  
  400.      ===============
  401.      Cut                                     ( Edit )
  402.      ===============
  403.  
  404.           Once an active region has been marked (see above), the Cut option 
  405.      becomes visible. Cutting a region writes the sound information  within 
  406.      the active region to a temporary clipboard file and CLEARS the  marked 
  407.      region. Data in the clipboard file will remain stored until the end of 
  408.      a  session,  or  until another Cut/Copy operation  is  performed.  The 
  409.      clipboard  data  is  available to the Paste  and  Mix  functions  (see 
  410.      below).  Note  that Cut differs from Copy in that the marked  area  is 
  411.      cleared  (ie. silence) after the Cut operation. If you wish to move  a 
  412.      sound  to new position then Cut simplifies the Copy/Clear process.  Be 
  413.      careful not to Cut when you really want to Copy!
  414.  
  415.  
  416.      ===============
  417.      Copy                                    ( Edit )
  418.      ===============
  419.  
  420.           Copy  is similar to the Cut option, but doesn't clear the  marked 
  421.      region. Note that Copy indicates data is copied to the clipboard file, 
  422.      not  to the wave box. To copy an area to other positions in  the  wave 
  423.      box,  Copy the desired area and then use a series of Pastes  to  place 
  424.      the data.
  425.  
  426.  
  427.      ===============
  428.      Paste                                   ( Edit )
  429.      ===============
  430.  
  431.           After Cutting or Copying data to the clipboard, that data may  be 
  432.      placed  in a new position in the wave box with a Paste operation.  You 
  433.      must  specify  the destination region with the left  mouse  button  as 
  434.      described  above.  The  clipboard data will be truncated  to  fit  the 
  435.      active  region  if necessary. You may re-paste the same data  as  many 
  436.      times  as  desired.  The  clipboard  will  only  change  its  contents 
  437.      following another Cut/Copy or by Quitting to DOS. Pasting data several 
  438.      times  after  the  original Copied data can be used  to  simulate echo 
  439.      or delay effects.
  440.  
  441.  
  442.      ===============
  443.      Mix                                     ( Edit )
  444.      ===============
  445.  
  446.           Mix  is similar to Paste except that the waveform data under  the 
  447.      destination  region  is mixed with the pasted data rather  than  being 
  448.      replaced  by it. You will be given choices about which data should  be 
  449.      scaled before the Mix is performed to avoid exceeding the maximum  and 
  450.      minimum  amplitudes. The Cut data which is about to be pasted  can  be 
  451.      halved in amplitude first, or left as it is. The existing data in  the 
  452.      destination  region  can be halved or left alone. If  the  destination 
  453.      region  is  scaled, you can have only the data within the  destination 
  454.      region scaled, or the entire sound sample scaled. If you are mixing  a 
  455.      low amplitude sound in a region containing low amplitude data, scaling 
  456.      may not be necessary. If the sum of the cut and destination amplitudes
  457.      might  exceed the wave box edges, then scaling will be  necessary.  If 
  458.      mixing  a region which is isolated from the rest of the sound  sample, 
  459.      you  may  wish to scale just the data in the  destination  region  and 
  460.      leave  the  rest  of the sample alone. The circumstances  of  the  Mix 
  461.      operation  will determine the scaling choices made. If you are  unsure 
  462.      about which sections need scaling, try experimenting with the  various 
  463.      options on some rubbish waveforms first.
  464.  
  465.  
  466.      ===============
  467.      Mirror segment                          ( Edit )
  468.      ===============
  469.  
  470.           Data  inside  the  active region will become  mirror  image.  The 
  471.      result  of this is that samples will sound backwards. This is  one  of 
  472.      the more interesting effects available.
  473.  
  474.  
  475.      ===============
  476.      Scale envelope                          ( Edit )
  477.      ===============
  478.  
  479.           Data  inside  the  active region will be scaled  by  a  specified 
  480.      factor. Constants for both ends are required, and points are scaled by 
  481.      a  straight line plotted between those constants. For example, if  the 
  482.      current data appears with uniform height inside the active region box, 
  483.      a  decay effect can be simulated by specifying a factor of 1  for  the 
  484.      left  side  and 0 for the right side. Note that scale factors  may  be 
  485.      real  numbers,  and that numbers greater than one may  cause  clipping 
  486.      distortion of the sound.
  487.  
  488.  
  489.      ===============
  490.      Clear                                   ( Edit )
  491.      ===============
  492.  
  493.           Clears (silences) sound inside the active region. You may  remove 
  494.      unwanted sound by marking the relevant regions and Clearing them.
  495.  
  496.  
  497.      ===============
  498.      Zoom                                    ( Edit )
  499.      ===============
  500.  
  501.           After  marking  an active region and selecting the  Zoom  option, 
  502.      data  inside  the left edge of the region will be shown  in  magnified 
  503.      form. It is then possible to perform all normal operations on data  in 
  504.      fine  detail. When in Zoom mode the right mouse button  allows  direct 
  505.      editing of waveform data by drawing over the wave box. You can  remove 
  506.      unwanted  clicks and pops by drawing over them. Also, if you  zoom  on 
  507.      the area below or above a pointer, the pointer will be visible in  the 
  508.      zoomed  window and may be moved with absolute resolution. The data  is 
  509.      displayed as one sample per pixel, so that pointers can be  positioned 
  510.      over individual samples if desired. When positioning the loop pointer, 
  511.      the zoom feature can be used  to position the loop pointer so that the 
  512.      waveform  level matches the level at the right pointer  thus  avoiding 
  513.      any clicks when loop mode is active.
  514.  
  515.  
  516.      ===============
  517.      Sample                                  ( Edit )
  518.      ===============
  519.  
  520.                Record sound to memory at current sampling rate. This resets 
  521.      the  three  pointers.   NOTE: the sampling function  requires  an  A/D 
  522.      converter  to  be  available (see  previous  discussion  on  converter 
  523.      requirements).  The sampling rate will determine the available  sample 
  524.      time  and sampling bandwidth. This function is irrelevant for the  PWM 
  525.      version.
  526.  
  527.  
  528.      ===============
  529.      Play song                               ( Song )
  530.      ===============
  531.  
  532.           As mentioned above, this package supports Pianoman .MUS files  to 
  533.      provide an automatic song mode. Pianoman is available from the  PCblue 
  534.      Vol  216 and PCsig Vol 279 catalogs and is available on many  Bulletin 
  535.      Boards.
  536.           Pianoman allows real time recording of tunes from the keyboard as 
  537.      well  as  manual  editing  of tunes. I  decided  that  using  Pianoman 
  538.      externally  was  easier  than  writing  an  equivalent  facility  from 
  539.      scratch. The only problem with this system (apart from having to start 
  540.      up  programs  continually)  is  that  Pianoman  in  not  system  speed 
  541.      independent. Although SAMPLER/PWMSAMPL tries to compensate for  system 
  542.      speed when playing songs, you will probably find that song speed needs 
  543.      to be adjusted manually (see Auto timer in the Settings section).
  544.           After  specifying a song file using the Read songfile option  and 
  545.      then  selecting  the Play song option, a prompt will appear.  You  may 
  546.      play  the  song  once from start to finish or  have  it  automatically 
  547.      repeat itself upon completion. While a song is playing, mouse activity 
  548.      is  suspended. If you wish to alter song speed etc., holding down  the 
  549.      right  shift  key pauses the song. The song speed can  be  altered  by 
  550.      changing the auto timer duration from the boxes at the lower right  on 
  551.      screen. The song can be terminated by pressing Ctrl (the mouse  cancel 
  552.      button is disabled).
  553.  
  554.  
  555.      ===============
  556.      Read songfile                           ( Song )
  557.      ===============
  558.  
  559.           This option allows specification of the current song file in  the 
  560.      same manner as reading a sound file. The desired song file is selected 
  561.      by  clicking on its name or selecting the manual entry box and  typing 
  562.      the  name  (with optional path). Song files are assumed to be  in  the 
  563.      same directory as sound files.
  564.  
  565.  
  566.      ===============
  567.      Concert A                               ( Miscellaneous )
  568.      ===============
  569.  
  570.           Produces a tone at the standard "concert A" pitch (440 Hz).  This 
  571.      may be useful when preparing to sample a sound if you require it to be 
  572.      replayed  at  "concert  pitch". If the sound  is  recorded  using  the 
  573.      default sample rate and was tuned to the reference tone, then  playing 
  574.      it  back from the keyboard with default tuning should produce a  sound 
  575.      which  is in tune with other instruments (assuming they are  tuned  to 
  576.      concert pitch too).
  577.  
  578.  
  579.      ===============
  580.      Monitor                                 ( Miscellaneous )
  581.      ===============
  582.  
  583.           Causes the input signal (A/D required) to be echoed to the output 
  584.      (D/A  or  speaker)  so  that the input  level  may  set,  equalisation 
  585.      adjusted etc., before actually sampling.
  586.  
  587.  
  588.      ===============
  589.      Play sound                              ( Play sound )
  590.      ===============
  591.  
  592.           Immediately  replays  the  current sound sample  at  the  default 
  593.      pitch.  The pitch may be altered using the tuning boxes  (see  above). 
  594.      This  option provides a fast way to replay sounds if you just want  to 
  595.      hear what they sound like.
  596.  
  597.  
  598.  
  599.  
  600.      Editing the Default Configuration
  601.      ---------------------------------
  602.  
  603.      When SAMPLER/PWMSAMPL is first run, a configuration file (SAMPLER.CNF) 
  604. is  read to determine some default settings. All defaults can  be  modified 
  605. from  the  Settings  menu  box, but you may like  to  change  the  defaults 
  606. permanently.  To  achieve  this, a pure ASCII editor can be  used,  but  be 
  607. careful to maintain the correct format. There should be four lines  present 
  608. and no leading spaces on any line. The four lines are
  609.  
  610.      1: Default  sound  files path - this  determines  where      
  611.        sound  files will be when first run. The  string  may 
  612.        include a drive prefix.
  613.  
  614.           eg. c:\data\sounds
  615.  
  616.      2: Default sound file - this sound sample file will  be 
  617.        loaded  when first run, and should be in the  default 
  618.        sound file path.
  619.  
  620.           eg. bass
  621.  
  622.      3: System type - this is a single letter indicating the 
  623.        type of system being used as follows:
  624.  
  625.             X - XT,  T - XT turbo,  A - AT,  U - AT turbo
  626.  
  627.           Note that this only affects SAMPLER. PWMSAMPL will 
  628.           override system selection because all timing  must 
  629.           be fixed for PWM output.
  630.  
  631.      4: Parallel  port  number or address - this  will  determine 
  632.        which  port SAMPLER will use for D/A output. The port  may 
  633.        be described as LPTx if a printer port is to be used, or a 
  634.        decimal  number which names a D/A board port  address.  As 
  635.        different   sources   of  documentation   give   different 
  636.        information  about LPT numbering, if no data appears on  a 
  637.        printer  port at first, try LPT1 to LPT3 until  data  does 
  638.        appear.  Use  this approach if you aren't sure  which  LPT 
  639.        number you are connecting to.
  640.  
  641.         Note that  PWMSAMPL will ignore this line. 
  642.  
  643.      5:  Default  instrument  (keyboard layout)  -  this  is 
  644.        either guitar or piano.
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.                    (C) Copyright 1989 by Rowan McKenzie
  652.  
  653.                   Comments   or   suggestions   for   improvement  
  654.         are  most welcome.
  655.                   I   accept  no responsibility for  any   injury  
  656.         or damage caused by the use of any of these files.
  657.  
  658.  
  659.                                                 Rowan McKenzie
  660.  
  661.                                                 35 Moore Ave,
  662.                                                 Croydon 3136
  663.                                                 Victoria,
  664.                                                 Australia
  665.  
  666.                 Can be contacted through:    
  667.                                          Eastcom OPUS (830/312),
  668.                                          Melbourne Data Exchange (832/360),
  669.                                          The Software Bank (632/301),
  670.                                          Eastwood BBS (831/343),
  671.                                          Tardis BBS Vic.
  672.                                          (All Vic., Australia)
  673.                                          (and most other Vic Opus boards)
  674.